/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package com.josescalia.tumblr.app;

import com.josescalia.tumblr.form.TumblrRssImageViewerForm;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 *
 * @author josescalia
 */
public class Bootstrap {
    public ApplicationContext appContext;
    public static final String APP_CONTEXT = "tumblrRssApplicationContext.xml";

    public static void main(String[] args) {
        Bootstrap app = new Bootstrap();
        app.runApp();
    }

    public void runApp() {
        appContext = new ClassPathXmlApplicationContext(APP_CONTEXT);
        TumblrRssImageViewerForm form = new TumblrRssImageViewerForm();
        form.setContext(new ClassPathXmlApplicationContext(appContext));
        form.setAppLookAndFeel((String) appContext.getBean("appLookAndFeel"));
        form.doShow();
        form.setVisible(true);
        System.out.println("Application Running!");
    }
}
